cmake_minimum_required(VERSION 3.8)
project(string_regex_replace)
string(REGEX REPLACE "Wor([a-z]?)d" "Woo" var1 "Hello World! Hello Word!")
message(STATUS "var1 = ${var1}")
string(REGEX REPLACE "Wor([a-z]?)d" "Woo" var2 "Hello World!" " Hello Word!")
message(STATUS "var2 = ${var2}")
